package com.hnevc.yinqi;

import java.util.Random;

public class Work10 {
    public static void main(String[] args) {
        int[]a=new int[10];
        Random r =new Random();
        for (int i = 0;i<a.length;i++){
            a[i]=r.nextInt(100);
            System.out.println(" "+a[i]);
        }
        int max =a[0];
        for (int i =0; i<a.length;i++){
            if (a[i]>max){
                max = a[i];
            }
        }
        System.out.println("最大值"+max);
    }
}
